package com.ambow.service.master.sysinteractivelog.service;

import com.ambow.service.master.sysinteractivelog.dao.SysInteractiveLogDao;
import com.ambow.service.master.sysinteractivelog.dto.SysInteractiveLogDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * @classname: SysInteractiveLogService
 * @description: 定义 sys_interactive_log 实现类
 * @author:  root
 */
@Service
@Slf4j
public class SysInteractiveLogService {

	@Autowired
	private SysInteractiveLogDao sysInteractiveLogDao;

	// 添加日志
	@Transactional(rollbackFor = {Exception.class})
	public int insertSysInteractiveLog(SysInteractiveLogDTO sysInteractiveLogDTO)throws Exception{
		int count = sysInteractiveLogDao.insertSysInteractiveLog(sysInteractiveLogDTO);
		return count;
	}

	// 获取SysInteractiveLog列表
	public List<SysInteractiveLogDTO> searchSysInteractiveLog(SysInteractiveLogDTO sysInteractiveLogDTO) throws Exception {
		List<SysInteractiveLogDTO> dataList =  sysInteractiveLogDao.searchSysInteractiveLog(sysInteractiveLogDTO);
		return dataList;
	}

}

